package p.ithorns.integration.zk.id;

/**
 * SnowFlakeIdx
 * TODO
 *
 * @author ithorns
 * @version 1.0
 * @date 2021/9/7 20:55
 */
public interface IdGenerator {

    String ID_SEPARATOR = "_";

    void init() throws Exception;

    void destroy();
    /**
     * 获取下一个ID
     *
     * @param idBean -参数
     * @return String ID
     */
    String getNextId(IdBean idBean);

    Long getNextId(String name);
}
